package ch.dao;

import ch.entity.danger;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

import java.util.List;
@Mapper
@Repository
public interface fdao {
    @Select("SELECT filename FROM `danger` WHERE `name`=#{name}")
    String getfilename(String name);
    @Select("SELECT * FROM `danger` WHERE `name`=#{name}")
    danger getfile(String name);
    @Update("UPDATE danger set filename=#{filename} WHERE `name`=#{name};")
    boolean setfilename(danger danger);
}
